<?php
defined('_JEXEC') or die('Restricted access');
$date = JRequest::getVar('date');
$db = JFactory::getDBO();
$query = "SELECT * FROM #__auction_visit WHERE log_date = '". $date."' AND gid = 18";
$db->setQuery($query);
$list = $db->loadObjectList();
?>
<style>
.pro_name_more {
    color: #B60800;
    font-size: 12px;
    font-weight: bold;
	border-bottom: 1px dotted #999999;
	padding: 5px 0 5px 5px;
}
.tbHistory td{
	border:solid #999 1px;
	border-bottom:none;
	border-left:none;
	text-align:center;
}

.tbHead td{
	background-color:#CCC;
	font-weight:bold;
}
</style>
<div class="pro_name_more"><strong>Statistics in <?php echo $date;?></strong>:</div>
<table width="550" align="center" class="tbHistory" style="border-bottom:solid #999 1px;">
	<tr class="tbHead">
    	<td align="center">#</td>
        <td align="center">Name</td>
        <td align="center">Email</td>
        <td align="center">Time</td>
    </tr>
    <?php $i = 1;	
	foreach($list as $date){
	?>
    <tr>
    	<td align="center"><?php echo $i;?></td>
        <td align="center"><?php echo $date->name;?></td>
        <td align="center"><?php echo $date->email;?></td>
        <td align="center"><?php echo $date->log_time;?></td>
    </tr>
    <?php $i++;}?>
</table>